cli/command: remove dependency on distribution/uuid#5879
cli/command: remove dependency on distribution/uuid#5879thaJeztah merged 1 commit intodocker:masterfrom
Conversation
This uuid package was introduced in 89db01e, but we want to reduce dependency on the old docker/distribution module. Replace it with google/uuid, which is a commonly used module for this and already a dependency. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #5879 +/- ##
==========================================
+ Coverage 59.32% 59.34% +0.02%
==========================================
Files 353 353
Lines 29731 29731
==========================================
+ Hits 17637 17645 +8
+ Misses 11112 11103 -9
- Partials 982 983 +1 |
| // OTEL processors may think the same process is restarting | ||
| // continuously. | ||
| semconv.ServiceInstanceID(uuid.Generate().String()), | ||
| semconv.ServiceInstanceID(uuid.NewString()), |
There was a problem hiding this comment.
I should mention that in theory, uuid.NewString() could panic, but I think chances for this to happen are really exceptional, and it's probably fine to just panic in that case;
cli/vendor/github.com/google/uuid/version4.go
Lines 17 to 23 in 3f154ad
There was a problem hiding this comment.
Alternatively we could do NewRandom(), check the error, and ignore it, but not sure if that's good.
There was a problem hiding this comment.
Ah, and existing code also could panic, so I think this comment can be ignored, as it doesn't change anything from that perspective;
cli/vendor/github.com/docker/distribution/uuid/uuid.go
Lines 72 to 74 in 3f154ad
This uuid package was introduced in 89db01e (#4889), but we want to reduce dependency on the old docker/distribution module.
Replace it with google/uuid, which is a commonly used module for this and already a dependency.
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)